package gui.lesson01;

import java.awt.*;

public class TestBorderLayout {
    public static void main(String[] args) {
        //东西南北中布局
        Frame frame = new Frame("TestBorderLayout");
        Button button0 = new Button("east");
        Button button1 = new Button("west");
        Button button2 = new Button("south");
        Button button3 = new Button("north");
        Button button4 = new Button("Center");
        frame.add(button0,BorderLayout.EAST);
        frame.add(button1,BorderLayout.WEST);
        frame.add(button2,BorderLayout.SOUTH);
        frame.add(button3,BorderLayout.NORTH);
        frame.add(button4,BorderLayout.CENTER);
        frame.setSize(400,400);
        frame.setVisible(true);
    }
}
